<?php 
class EditUserForm extends BaseForm {
	
	private $adding; 
	private $id; 
	private $login; 
	private $name; 
	private $admin; 
	private $connect; 
	private $email; 
	private $sendEmail; 
	
	public function EditUserForm(){
		parent::BaseForm();
	}
	
	public function setAdding($val){$this->adding = $val; }
	public function setId($val){$this->id = $val; }
	public function setLogin($val){$this->login = $val; }
	public function setName($val){$this->name = $val; }
	public function setAdmin($val){$this->admin = $val; }
	public function setConnect($val){$this->connect = $val; }
	public function setEmail($val){$this->email = $val; }
	public function setSendEmail($val){$this->sendEmail = $val; }
	
	public function isAdding(){ return $this->adding; }
	public function isAdmin(){ return $this->admin; }
	public function isConnect(){ return $this->connect; }
	public function isSendEmail(){ return $this->sendEmail; }
	
	public function getId(){ return $this->id; }
	public function getLogin(){ return $this->login; }
	public function getName(){ return $this->name; }
	public function getEmail(){ return $this->email; }
	
	public function clear(){
		$this->setAdding(false);
		$this->setId(null);
		$this->setLogin(null);
		$this->setName(null);
		$this->setAdmin(false);
		$this->setConnect(false);
		$this->setEmail(null);
		$this->setSendEmail(false);
	}
	
	public function getUser(){
		$u = new User();
		
		$u->setId($this->getId()); 
		$u->setName($this->getName()); 
		$u->setLogin($this->getLogin()); 
		$u->setEmail($this->getEmail()); 
		$u->setSendEmail($this->isSendEmail()); 
		$u->setAdmin($this->isAdmin()); 
		$u->setConnect($this->isConnect());
		
		return $u;
	}
}
?>